/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.cesupa.cabcc.sudi;

import br.cesupa.cabcc.dao.NoticiaDAO;
import br.cesupa.cabcc.entity.Noticia;
import java.util.Date;
import java.util.List;

/**
 *
 * @author yuri
 */
public class NoticiaSUDI extends GenericSUDI<Noticia> implements NoticiaDAO {

    public Noticia getById(Integer id) {
        return (Noticia) super.executeNamedQueryObject("Noticia.findById", "id", id);
    }

    public List<Noticia> getLikeTitulo(String titulo) {
        return super.executeNamedQueryList("Noticia.findLikeTitulo", ":titulo", "%"+titulo+"%");
    }

    public List<Noticia> getByData(Date data) {
        return super.executeNamedQueryList("Noticia.findByData", "dataNoticia", data);
    }

}
